import QtQuick
import QtQuick.Controls

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("多联动Dial控件")

    Row {
        spacing: 20
        anchors.centerIn: parent

        Dial {
            id: masterDial
            width: 150
            height: 150
            from: 0
            to: 100
            value: 50

            onValueChanged: {
                slaveDial1.value = value / 2
                slaveDial2.value = 100 - value
            }
        }

        Dial {
            id: slaveDial1
            width: 120
            height: 120
            from: 0
            to: 50
            enabled: false
        }

        Dial {
            id: slaveDial2
            width: 120
            height: 120
            from: 0
            to: 100
            enabled: false
        }
    }
}
